<!DOCTYPE html>
<html>
	<head>
		<include file="./Public/Header/header.html,./Public/Header/jquery.html,./Public/Header/mobile.html,./Public/Header/validate.html,./Public/Header/artDialog.html" />
		<title>后台登录</title>
	</head>
<body>
<div id="loginpage" data-role="page" data-theme="c"  data-position="fixed">
	<include file="By/mobile_header" header="后台登录"/>
	<div data-role="content">
		<form id="loginform" method="post" action="{:U('Home/By/admin')}">
			<div data-role="fieldcontain">
  			<label for="username">用户名:</label>
  			<input type="text" name="username" id="username"  placeholder="请输入您的用户名">
  			</div>
  			<div data-role="fieldcontain">
  			<label for=password>密码：</label>
  			<input type="password" name="password" id="password"  placeholder="请输入您的密码">
  			</div>
  			<input type="submit" value="登陆" name="loginbtn" id="loginbtn" data-theme="e">
		</form>
	</div>
</div>
<script>
$('#loginpage').bind('pageinit', function(event) {
	$('#loginform').validate({
		submitHandler:function(form) {
			form.submit();
		},
		errorPlacement: function(error, element) {  
		    error.appendTo(element.parent().parent());  
		},
		onfocusout: function(element) { $(element).valid();},
		rules: {
			username: {
				required: true
			},
			password: {
				required: true
			}
		},
		 messages:  {
		username: {
			required:"请输入您的用户名"
		},
		password: {
			required:"请输入您的密码"
		}
		}	
	});
});
</script>
</body>
</html>